home *** CD-ROM | disk | FTP | other *** search
/ Shareware Grab Bag / Shareware Grab Bag.iso / 005 / note11.arc / FINK next >
Encoding:
Text File  |  1986-03-04  |  3.2 KB  |  60 lines

  1. {MS-Pascal / MS-FORTRAN FCB Declaration Include File}
  2. INTERFACE;  UNIT 
  3.   FILKQQ (FCBFQQ, FILEMODES, SEQUENTIAL, TERMINAL, DIRECT);
  4.  
  5. TYPE
  6. FILEMODES = (SEQUENTIAL, TERMINAL, DIRECT);
  7.  
  8. FCBFQQ = RECORD     {byte offsets start every field comment}
  9. {fields accessible by Pascal user as <file variable>.<field>}
  10. TRAP: BOOLEAN;      {00 Pascal user trapping errors if true}
  11. ERRS: WRD(0)..15;   {01 error status, set only by all units}
  12. MODE: FILEMODES;    {02 user file mode;  not used in unit U}
  13. MISC: BYTE;         {03 pad to word bound, special user use}
  14. {fields shared by units F, V, U;  ERRC / ESTS are write-only}
  15. ERRC: WORD;         {04 error code, error exists if nonzero}
  16.                         {1000..1099:  set for unit U errors}
  17.                         {1100..1199:  set for unit F errors}
  18.                         {1200..1299:  set for unit V errors}
  19. ESTS: WORD;         {06 error specific data usually from OS}
  20. CMOD: FILEMODES;    {08 system file mode;  copied from MODE}
  21. {fields set / used by units F and V, and read-only in unit U}
  22. TXTF: BOOLEAN;      {09 true: formatted / ASCII / TEXT file}
  23.                         {false: not formatted / binary file}
  24. SIZE: WORD;         {10 record size set when file is opened}
  25.                         {DIRECT: always fixed record length}
  26.                         {others: max buffer variable length}
  27. IERF: BOOLEAN;      {12 Unit U Incomplete End Of Record    }
  28.                         {Kluge. Set false by opnuqq and    }
  29.                         {pccuqq, and true by peruqq. Thus  }
  30.                         {if true in wefuqq, it means that  }
  31.                         {there is an incomplete line, and  }
  32.                         {pccuqq should be called to flush  }
  33.                         {it. Only applies to terminal files}
  34. MISA: BYTE;         {13 Used to keep alignment with old misa}
  35. OLDF: BOOLEAN;      {14 true: must exist before open; RESET}
  36.                         {false: can create on open; REWRITE}
  37. INPT: BOOLEAN;      {15 true: user is now reading from file}
  38.                         {false: user is now writing to file}
  39. RECL: WORD;         {16 DIRECT record number, lo order word}
  40. RECH: WORD;         {18 DIRECT record number, hi order word}
  41. USED: WORD;         {20 number bytes used in current record}
  42. {fields used internally by units F or V not needed by unit U}
  43. LINK: ADR OF FCBFQQ;{22 DS offset address of next open file}
  44. BADR: ADRMEM;       {24 F: DS offset address for buffer var}
  45. TMPF: BOOLEAN;      {26 F: is a temp file;  delete on CLOSE}
  46. FULL: BOOLEAN;      {27 F: buffer variable lazy eval status}
  47. UNFM: BOOLEAN;      {28 V: for unformatted binary file mode}
  48. OPEN: BOOLEAN;      {29 F: file opened (by RESET / REWRITE)}
  49. FUNT: INTEGER;      {30 V: FORTRAN unit number (1 to 32767)}
  50. ENDF: BOOLEAN;      {32 V: last I/O statement was a ENDFILE}
  51. {fields set / used by unit U, and read-only in units F and V}
  52. REDY: BOOLEAN;      {33 buffer ready if true;  set by F / U}
  53. BCNT: WORD;         {34 number of data bytes actually moved}
  54. EORF: BOOLEAN;      {36 true if end of record read, written}
  55. EOFF: BOOLEAN;      {37 end of file flag set after EOF read}
  56.      {unit U (operating system) information starts here}
  57.      {end of section for unit U specific OS information}
  58. END;
  59. END;
  60.